Skip to content

Conversation

Veykril
Copy link
Member

@Veykril Veykril commented Nov 9, 2022

changelog: [unnecessary_safety_doc]: Add unnecessary_safety_doc lint

fixes #6880

This lint does not trigger for private functions, just like missing_safety_docs. Reason for that was implementation simplicity and because I figured asking first would make more sense, so if it should trigger for private functions as well let me know and I'll fix that up as well.

@rust-highfive
Copy link

r? @Jarcho

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Nov 9, 2022
@Veykril Veykril force-pushed the unnecessary-safety-doc branch from 9c2f9c9 to 146bd1e Compare November 10, 2022 09:09
@Jarcho
Copy link
Contributor

Jarcho commented Nov 13, 2022

Looks good. Thank you.

@bors r+

@bors
Copy link
Contributor

bors commented Nov 13, 2022

📌 Commit 146bd1e has been approved by Jarcho

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Nov 13, 2022

⌛ Testing commit 146bd1e with merge 6ba3a00...

@bors
Copy link
Contributor

bors commented Nov 13, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Jarcho
Pushing 6ba3a00 to master...

@bors bors merged commit 6ba3a00 into rust-lang:master Nov 13, 2022
@Veykril Veykril deleted the unnecessary-safety-doc branch November 14, 2022 08:49
bors added a commit that referenced this pull request Nov 30, 2022
Move `unnecessary_unsafety_doc` to `pedantic`

This lint was added in #9822. I like the idea, but also agree with #9986 as well. I think it should at least not be warn-by-default. This is one of these cases, where I'd like a group between pedantic and restriction. But I believe that users using `#![warn(clippy::pedantic)]` will know how to enable the lint if they disagree with it.

---

Since the lint is new:

changelog: none

r? `@flip1995` since I'd suggest back porting this, the original PR was merged 16 days ago.

Closes: #9986 (While it doesn't address everything, I believe that this is the best compromise)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lint request: Safety comment on safe code
4 participants